Next | Prev | Up | Top | Contents | Index
Transferring Data
The device driver executes in the kernel virtual address space, but it must transfer data to and from the address space of a user process. The kernel supplies two kinds of functions for this purpose:
- functions that transfer data between driver variables and the address space of the current process
- functions that transfer data between driver variables and the buffer described by a uio_t object
Warning: The use of an invalid address in kernel space with any of these functions causes a kernel panic.
All functions that reference an address in user process space can sleep, because the page of process space might not be resident in memory. As a result, such functions cannot be used in an interrupt handler, or while holding a basic lock.
- General Data Transfer
-
- Transferring Data Through a uio_t Object
-
Next | Prev | Up | Top | Contents | Index